<!-- 监测问题统计 -->
<div>
  <div nz-row class="mt10">
    <!-- <div nz-col nzSpan="2"></div> -->
    <div nz-col nzSpan="24">
      录入部门：
      <nz-tree-select [nzDropdownMatchSelectWidth]="false" style="width: 150px;"
        [nzDropdownStyle]="{ 'max-height': '300px' }" [(ngModel)]="queryParam.sysOrg" [nzNodes]="allBmNodes">
      </nz-tree-select>

      录入时间：
      <nz-date-picker [(ngModel)]="queryParam._sysTimeStart" nzPlaceHolder="开始时间"
        (ngModelChange)="dateChange($event,'sysTimeStart')"></nz-date-picker>
      <nz-date-picker [(ngModel)]="queryParam._sysTimeEnd" nzPlaceHolder="结束时间"
        (ngModelChange)="dateChange($event,'sysTimeEnd')"></nz-date-picker>
      审核状态：
      <nz-select [(ngModel)]="queryParam.status" nzAllowClear style="width: 150px;">
        <nz-option *ngFor="let item of statusList;let i = index" [nzLabel]="item" [nzValue]="i">{{item}}
        </nz-option>
      </nz-select>

      文档类型：
      <nz-select [(ngModel)]="queryParam.docType" nzAllowClear style="width: 150px;">
        <nz-option *ngFor="let item of wdlx" [nzLabel]="item.vcDictName" [nzValue]="item.vcDictCode">
        </nz-option>
      </nz-select>

      文档级别：
      <nz-select [(ngModel)]="queryParam.docLevel" nzAllowClear style="width: 150px;">
        <nz-option nzLabel="一级" nzValue="0">一级 </nz-option>
        <nz-option nzLabel="二级" nzValue="1">二级 </nz-option>
        <nz-option nzLabel="三级" nzValue="3">三级 </nz-option>
      </nz-select>

      <button style="margin-left:10px;" nz-button nzType="primary" (click)="query(true)">查询</button>
      <!-- <button style="margin-left:10px;" nz-button nzType="primary" (click)="dataExport()">导出</button> -->
      <!-- <button style="margin-left:10px;" nz-button nzType="primary" (click)="ngOnInit()">草</button> -->
      <button style="margin-left:10px;" nz-button (click)="reset()">重置</button>
    </div>
  </div>
  <div nz-row class="mt10">
    <div nz-col nzSpan="24">
      <button *ngIf="buttonCfg.add" class="margin-left10" nz-button nzType="default" (click)="showEditor('add')"><i
          nz-icon nzType="plus-circle" nzTheme="outline"></i>新增</button>
      <button *ngIf="buttonCfg.edit" class="margin-left10" nz-button nzType="default" (click)="showEditor('edit')"><i
          nz-icon nzType="edit" nzTheme="outline"></i>修改</button>
      <button *ngIf="buttonCfg.delete" class="margin-left10" nz-button nzType="default" (click)="deleteAll()"><i nz-icon
          nzType="delete" nzTheme="outline"></i>删除</button>
      <button *ngIf="buttonCfg.tibao" class="margin-left10" nz-button nzType="default" (click)="tibao(bmSelect)"><i
          nz-icon nzType="check-circle" nzTheme="outline"></i>提报</button>
      <button *ngIf="buttonCfg.tibaoLingdao" class="margin-left10" nz-button nzType="default"
        (click)="tibaoLeader(ldSelect)"><i nz-icon nzType="check-circle" nzTheme="outline"></i>提报领导</button>
      <button *ngIf="buttonCfg.tongyi" class="margin-left10" nz-button nzType="default" (click)="tongyi()"><i nz-icon
          nzType="check-circle" nzTheme="outline"></i>同意</button>
      <button *ngIf="buttonCfg.bohui" class="margin-left10" nz-button nzType="default" (click)="bohui(shyj)"><i nz-icon
          nzType="close-circle" nzTheme="outline"></i>驳回</button>
      <button *ngIf="buttonCfg.fanhui" class="margin-left10" nz-button nzType="default" (click)="fanhui()"><i nz-icon
          nzType="check-circle" nzTheme="outline"></i>盖章返回</button>
      <button *ngIf="buttonCfg.wancheng" class="margin-left10" nz-button nzType="default" (click)="wancheng()"><i
          nz-icon nzType="check-circle" nzTheme="outline"></i>完成任务</button>
      <button class="margin-left10" nz-button nzType="default" (click)="showWcqk()"><i nz-icon nzType="clock-circle"
          nzTheme="outline"></i>完成情况</button>

    </div>

  </div>
  <div nz-row class="mt10 bgwhite">
    <!-- <div nz-col nzSpan="2"></div> -->
    <div nz-col nzSpan="24">
      <nz-table #nzTable_bjwttj [nzData]="tableData" [nzLoadingDelay]="1000" nzBordered [nzShowPagination]="false"
        [nzFrontPagination]="false" [nzNoResult]="''" nzSize="small" [nzLoading]="loading" [nzScroll]="lockHeadScroll">
        <thead>
          <tr>
            <th nzAlign="center" nzShowCheckbox (nzCheckedChange)="checkAll($event)" nzWidth="50px"></th>
            <th nzAlign="center" nzWidth="50px">序号</th>
            <th nzAlign="center" nzWidth="200px">标题</th>
            <th nzAlign="center" nzWidth="80px">级别</th>
            <th nzAlign="center" nzWidth="200px">文档内容</th>
            <th nzAlign="center" nzWidth="100px">审核状态</th>
            <th nzAlign="center" nzWidth="100px">录入部门</th>
            <th nzAlign="center" nzWidth="100px">录入人</th>
            <th nzAlign="center" nzWidth="150px">录入时间</th>
            <th nzAlign="center">备注</th>
          </tr>
        </thead>
        <tbody>
          <tr *ngFor="let data of tableData;index as i" (click)="trClick(data)" (dblclick)="trDbclick(data)" nz-tooltip
            [nzTooltipTitle]="mode==='edit'?'双击填写进度':null" nzTooltipPlacement="bottom"
            [style.cursor]="mode==='edit'?'pointer':'default'" [nzTooltipTrigger]="mode==='edit'?null:null"
            [class.bg-green]="data.status==='10'" [class.tr-checked]="data.checked?'tr-checked':''">
            <td nzShowCheckbox [(nzChecked)]="data.checked" nzWidth="50px"></td>
            <!-- 序号 -->
            <td nzAlign="center">{{+i + 1}}</td>
            <!-- 标题 -->
            <td nzAlign="center">{{data.title}}</td>
            <!-- 级别 -->
            <td nzAlign="center">{{docLevel[data.docLevel]}}</td>
            <!-- 文档内容 -->
            <td nzAlign="center">
              <div *ngFor="let doc of data._docArr">
                <nz-tag [nzMode]="tagCloseAble(data)" (nzOnClose)="tagClose($event,doc)"
                  style="display: -webkit-inline-box;">
                  <div class="a-wrap">
                    <a (click)="showDoc(doc.url,data)">
                      <ellipsis length="15">
                        {{doc.name}}
                      </ellipsis>
                    </a>
                  </div>
                </nz-tag>
              </div>
              <!-- <div class="ljqkDiv">
              </div> -->
            </td>
            <!-- 审核状态 -->
            <td nzAlign="center">{{statusList[data.status]}}</td>
            <!-- 录入部门 -->
            <td nzAlign="center">{{data.sysOrgname}}</td>
            <!-- 录入人 -->
            <td nzAlign="center">{{data.sysUser}}</td>
            <!-- 录入时间 -->
            <td nzAlign="center">
              {{data.sysTime}}
            </td>
            <!-- 备注 -->
            <td nzAlign="center">
              <div class="ljqkDiv">
                {{data.note}}
              </div>
            </td>
          </tr>

        </tbody>
      </nz-table>
      <div style="display: flex;justify-content: space-between;">
        <div class="pageWrap">
          每页
          <nz-select [(ngModel)]="pageSize" (ngModelChange)="query()">
            <nz-option nzValue="20" nzLabel="20"></nz-option>
            <nz-option nzValue="50" nzLabel="50"></nz-option>
            <nz-option nzValue="100" nzLabel="100"></nz-option>
            <nz-option nzValue="200" nzLabel="200"></nz-option>
          </nz-select> 条&nbsp;&nbsp;&nbsp;总共<span class="pageTotal">{{pageTotal}}</span>条
        </div>
        <div class="pageInation">
          <nz-pagination [nzPageSize]="pageSize" [(nzPageIndex)]="pageIndex" [nzTotal]="pageTotal"
            (nzPageIndexChange)="query()"></nz-pagination>
        </div>
      </div>
    </div>
  </div>
</div>


<nz-modal [(nzVisible)]="editor.visible" [nzTitle]="editor.title" (nzOnCancel)="editor.cancel()" [nzFooter]="null"
  [nzBodyStyle]="{width: editor.width}" [nzWidth]="editor.width">
  <app-splc-editor [params]="editor.params" (optSuccess)="query($event)" (optCancel)="editor.cancel()">
  </app-splc-editor>
</nz-modal>
<nz-modal [(nzVisible)]="wcqk.visible" [nzTitle]="wcqkTitle" (nzOnCancel)="wcqk.cancel()" [nzFooter]="null"
  [nzBodyStyle]="{width: wcqk.width}" [nzWidth]="wcqk.width" class="self-defined-modal" nzClosable="false">
  <app-splc-wcqk [params]="wcqk.params" (optSuccess)="query($event)" (optCancel)="wcqk.cancel()"
    [sizeMode]="wcqk.sizeStatus">
  </app-splc-wcqk>
</nz-modal>

<div style="position: absolute;top: 0;">
  <iframe [attr.src]="iframeSrc" frameborder="0"></iframe>
</div>


<ng-template #bmSelect>
  <div nz-row>
    <div nz-col nzSpan="24">
      <ng-container *ngIf="userInfo.N_LEVEL===10;else gqConfirm">
        确认提报？
      </ng-container>
      <ng-template #gqConfirm>
        选择部门：
        <!-- <nz-tree-select #bmTree [nzDropdownMatchSelectWidth]="false" style="width: 150px;"
          [nzDropdownStyle]="{ 'max-height': '300px' }" [(ngModel)]="saveParam._bm" [nzNodes]="bmNodes">
        </nz-tree-select> -->
        <nz-select [(ngModel)]="saveParam._bm" nzAllowClear style="width: 150px;">
          <nz-option *ngFor="let item of bmNodes" [nzValue]="item.ID" [nzLabel]="item.NAME">
          </nz-option>
        </nz-select>
      </ng-template>
    </div>
  </div>
</ng-template>

<ng-template #ldSelect>
  <div nz-row>
    <div nz-col nzSpan="24">
      选择分管领导：
      <nz-select [(ngModel)]="saveParam._leader" nzAllowClear style="width: 150px;">
        <nz-option *ngFor="let item of leaders" [nzValue]="item.opValue" [nzLabel]="item.opName"></nz-option>
      </nz-select>
    </div>
  </div>
</ng-template>

<ng-template #shyj>
  <div nz-row>
    <div nz-col nzSpan="24">
      填写意见：
      <textarea nz-input nzAutosize="true" [(ngModel)]="saveParam.operateSituation"></textarea>
    </div>
  </div>
</ng-template>



<ng-template #wcqkTitle>
  <div class="modal-head-div">
    {{wcqk.title}}
    <div class="flex">
      <button *ngIf="wcqk.sizeStatus==='normal'" nz-button nzType="default" class="max-normal"
        (click)="wcqk.btnClick('max')">
        <i nz-icon nzType="arrows-alt"></i></button>
      <button *ngIf="wcqk.sizeStatus==='max'" nz-button nzType="default" class="max-normal"
        (click)="wcqk.btnClick('normal')">
        <i nz-icon nzType="shrink" nzTheme="outline"></i></button>
      <button nz-button nzType="default" (click)="wcqk.cancel()">
        <i nz-icon nzType="close" nzTheme="outline"></i></button>
    </div>
  </div>
</ng-template>